php array get first x elements

71

php array get first x elements -

$sliced_array = array_slice($array, 0, 5)

get first element of array php -

array_values($array)[0];

Comments

Submit
0 Comments